package com.sb.money.entities;

// Generated Dec 2, 2012 10:52:01 PM by Hibernate Tools 3.2.2.GA

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Days generated by hbm2java
 */
@Entity
@Table(name = "days"
        , catalog = "money")
public class Days implements java.io.Serializable {

    private static final long serialVersionUID = 4230424884447255582L;
    private Long daysId;
    private Item item;
    private Date daysDate;
    private int daysItemCount;

    public Days() {
    }

    public Days(Item item, Date daysDate, int daysItemCount) {
        this.item = item;
        this.daysDate = daysDate;
        this.daysItemCount = daysItemCount;
    }

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "DAYS_ID", unique = true, nullable = false)
    public Long getDaysId() {
        return this.daysId;
    }

    public void setDaysId(Long daysId) {
        this.daysId = daysId;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "DAYS_ITEM", nullable = false)
    public Item getItem() {
        return this.item;
    }

    public void setItem(Item item) {
        this.item = item;
    }

    @Temporal(TemporalType.DATE)
    @Column(name = "DAYS_DATE", nullable = false, length = 10)
    public Date getDaysDate() {
        return this.daysDate;
    }

    public void setDaysDate(Date daysDate) {
        this.daysDate = daysDate;
    }

    @Column(name = "DAYS_ITEM_COUNT", nullable = false)
    public int getDaysItemCount() {
        return this.daysItemCount;
    }

    public void setDaysItemCount(int daysItemCount) {
        this.daysItemCount = daysItemCount;
    }

}
